package com.oocl.euc.core.maintenance.model;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;
import java.util.List;

@Entity
@Table(name = "PCRS_CATEGORY")
public class Category implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Column(name = "CATEGORY_ID", length = 20)
    private String categoryId;

    @Column(name = "CATEGORY_NAME", length = 200)
    private String categoryName;

    @Column(name = "SORT_SEQ")
    private Integer sortSeq;

    @Column(name = "UPDATED_AT")
    private Date updatedAt;

    @OneToMany(cascade = CascadeType.ALL, mappedBy = "category", fetch = FetchType.LAZY)
    private List<SubCategory> subCategory;


    public String getCategoryId() {
        return categoryId;
    }

    public void setCategoryId(String categoryId) {
        this.categoryId = categoryId;
    }


    public String getCategoryName() {
        return categoryName;
    }

    public void setCategoryName(String categoryName) {
        this.categoryName = categoryName;
    }


    public Integer getSortSeq() {
        return sortSeq;
    }

    public void setSortSeq(Integer sortSeq) {
        this.sortSeq = sortSeq;
    }


    public Date getUpdatedAt() {
        return updatedAt;
    }

    public void setUpdatedAt(Date updatedAt) {
        this.updatedAt = updatedAt;
    }


    public List<SubCategory> getSubCategory() {
        return subCategory;
    }

    public void setSubCategory(List<SubCategory> subCategory) {
        this.subCategory = subCategory;
    }
}
